<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文章列表</title>
    <link rel="icon" href="../favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="../element-ui/lib/theme-chalk/index.css">
    <script src="../js/vue.js"></script>
    <script src="../element-ui/lib/index.js"></script>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <style>
        #submit{
            background-color:#20A0FF;
            color:white;
        }
    </style>
</head>
<body>
     <div id="addArticle" style="margin-right: 200px;margin-left: 200px">
         <h2>发布新的文章</h2>
         <el-form ref="form" :model="form" th:action="@{/article/add}" method="post" label-width="80px">
             <el-form-item label="标题">
                 <el-input v-model="form.title" type="text" name="title">></el-input>
             </el-form-item>
             <el-form-item label="副标题">
                 <el-input v-model="form.summary" type="text" name="summary" size="50"></el-input>
             </el-form-item>
             <el-form-item label="内容">
                 <el-input type="textarea" v-model="form.desc" name="content" cols="60" rows="20"></el-input>
             </el-form-item>
             <el-form-item>
                 <el-input id="submit" type="submit" value="发布新文章" ></el-input>
             </el-form-item>
         </el-form>
     </div>
    <script>
        new Vue({
            el:"#addArticle",
            data() {
                return {
                    form: {
                        name: '',
                        region: '',
                        date1: '',
                        date2: '',
                        delivery: false,
                        type: [],
                        resource: '',
                        desc: ''
                    }
                }
            },
            methods: {
                onSubmit() {
                    console.log('submit!');
                }
            }
        })
    </script>
</body>
</html>